import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Queue;

public class Test {
    public static void main1(String[] args) {
        MyStack myStack = new MyStack();
        myStack.push(1);
        myStack.push(1);
        myStack.push(1);
        myStack.push(1);

        MyStack2<Integer> myStack2 = new MyStack2<>();

    }

    public static void main2(String[] args) {
        LinkedList<Integer> stack = new LinkedList<>();

        stack.push(10);//头插法入栈
        stack.push(10);
        stack.push(10);
        stack.push(10);


    }

    public static void main(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(1);
        queue.offer(2);
        queue.offer(3);
        queue.offer(4);
        queue.offer(5);//源码中属于尾插法
        System.out.println(queue.peek());
    }
}
